/**
 * 主界面顶部Logo，系統名称等view.
 * @author 马玉德
 * @version 1.0.0, 2015-10-20
 */
Ext.define('MyApp.view.HeaderView', {
	extend : 'Ext.panel.Panel',
	alias: 'widget.headerview',
	name: 'headerView',
	border : false,
	region : 'north',
	bodyStyle: {
		background: '#FFFFFF'
	},
	height : 50,
	layout: 'border',
	//layout: {
	//	align: 'middle',
	//	pack: 'left',
	//	type: 'hbox'
	//},
	defaults: {
		border: false
	},
	items : [
		{
			xtype: 'panel',
			name: 'header_userpanel',
			height: 40,
			width:300,
			style: 'text-align:center;',
			region: 'west',
			layout: {
				align: 'middle',
				pack: 'center',
				type: 'hbox'
			},
			items: [
				{
					xtype : 'label',
					style:'color:#157FCC;font-size: 24px;font-weight:bolder ',
					text : '微讯通用后台管理系统'
				}]
		  },
			{
				xtype: 'panel',
				name: 'header_userpanel',
				height: 40,
				style: 'text-align:center;',
				region: 'center',
				layout: {
					align: 'middle',
					pack: 'center',
					type: 'hbox'
				},
				items: [
					{
					id : 'welcomemsg',
					xtype : 'label',
					text : '欢迎您，XXX'
				}, {
					xtype : 'label',
					text : '  日期：' + Ext.Date.format(new Date(), 'Y-m-d')
				}]
			},
			{
			xtype: 'panel',
			name: 'header_logoutpanel',
			height: 40,
			style: 'text-align:center;',
				region: 'east',
			//bodyCls: 'header_bg',
				layout: {
					align: 'middle',
					pack: 'center',
					type: 'hbox'
				},
			items:[
				{
				xtype: 'image',
					margins: '10 5 0 0 ',
				width: 74,
				height: 35,
				src: '../resource/images/header/helpbg.png',
				style: 'cursor:pointer',
				title: '帮助',
				name: 'help'
			},{
				xtype: 'image',
					margins: '10 5 0 0 ',
				width: 91,
				height: 35,
				src: '../resource/images/header/modifypwdbg.png',
				style: 'cursor:pointer',
				title: '修改密码',
				name: 'modifypwd'
			}, {
				xtype: 'image',
				margins: '10 5 0 0 ',
				width: 74,
				height: 35,
				src: '../resource/images/header/logoutbg.png',
				style: 'cursor:pointer',
				title: '注销',
				name: 'logout'
			}]
		}]
});